home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / estat21.zip / DEMO < prev    next >
Text File  |  1992-08-05  |  11KB  |  482 lines

  1. ; Demo file for EASISTAT
  2. ; All lines beginning with a ';' will be ignored
  3.  
  4. ; An 'e' at the start of a line is short for 'echo' - the line will be 
  5. ; copied to the output but there will be no other effect
  6.  
  7. E                         EASISTAT - DEMONSTRATION
  8. E Welcome to this demonstration of EASISTAT. EASISTAT is a cheap and 
  9. E cheerful statistics package, and this demonstration is intended to show 
  10. E you most of its features so you can see what is available. 
  11. E This demonstration will pause intermittently to allow you to read what 
  12. E is displayed on the screen. When it is paused you have the option of 
  13. E stopping the demonstration (by typing 'E'), taking temporary control (by 
  14. E typing 'K') or carrying on with the rest of the demonstration (by 
  15. E pressing any other key). If this is your first experience of EASISTAT 
  16. E then it is probably best just to go straight through the demonstration. 
  17. E If you do want to finish it then after you have typed 'E' you can enter 
  18. E 'Q' for quit and then confirm it by entering 'Y' for yes and you will 
  19. E leave the program.
  20. PAUSE
  21. E                          A WORD ABOUT SHAREWARE
  22. E EASISTAT is distributed as a Shareware program. That means that you are 
  23. E legally allowed to copy it and give copies to other people who you think 
  24. E might like it - in fact you are encouraged to do so. However please note 
  25. E the following points:
  26. PAUSE
  27. E 1. The copyright of the program remains with ARC Scientific limited.
  28. E 2. You must not charge more than a nominal fee for the program if you 
  29. E pass it on to someone else, nor may you distribute the disc for any 
  30. E promotional purposes or for your personal gain. 
  31. E 3. Please acknowledge the program in any publications of work for which 
  32. E it was used. 
  33. E 4. If you pass it on you must do so in unmodified form all the related
  34. E files must all be passed on as well. 
  35. PAUSE
  36. E
  37. E Once you have evaluated the program we hope you will pay for it (current 
  38. E price 40 pounds) and if you do so you will receive an up-to-date 
  39. E version of the program together with a full manual, and you will be 
  40. E supporting the concept of shareware. For details please read the file 
  41. E READ.ME or contact: 
  42. E   ARC Scientific Limited,
  43. E   257 Woodstock Road,
  44. E   Oxford OX2 7AE.
  45. E   Tel. 0865 310167 
  46. E ....Coming next..... The Demonstration!
  47. PAUSE
  48. E Right, that's that over with. Let's show you some of EASISTAT'S 
  49. E commands. The first one is one to show us what commands are available 
  50. E and is called HELP, or H for short (you can always use upper or lower 
  51. E case letters, but maybe upper case is clearer for you to see what is 
  52. E happening). Once this pause is finished this DEMO file will type:
  53. E HELP
  54. PAUSE
  55.  
  56.  
  57.  
  58. HELP
  59. PAUSE
  60. E
  61. E So, that's how to remind ourselves of the commands available. Now let's 
  62. E read in some data. If we want see what files are available on disc we 
  63. E can use the SYSTEM command like this:
  64. E SYSTEM DIR
  65. PAUSE
  66. SYSTEM DIR
  67.  
  68. E Since EASISTAT is being run from a command file, it does not pause to
  69. E allow you to inspect the list of files. We already know we're going to
  70. E use the file called EXAMPLE.DAT. The command is:
  71. E DATA EXAMPLE.DAT
  72. PAUSE
  73.  
  74.  
  75.  
  76. DATA EXAMPLE.DAT
  77. E Let's see what we've read in. To do this we can use the LIST command, 
  78. E but we don't want to see all 100 lines of the data so we'll use the LIST 
  79. E IF option to look at just the first 5 lines, like this:
  80. E LIST IF ROW<=5
  81. PAUSE
  82.  
  83.  
  84.  
  85. LIST IF ROW<=5
  86. E The data is just arranged in vertical columns under one line of titles. 
  87. E There are too many titles to see all of them across the screen, and we 
  88. E also need to know the numbers of the columns they refer to. To do that we 
  89. E use the TITLE command like this: 
  90. E TITLE 
  91. PAUSE 
  92.  
  93.  
  94.  
  95. TITLE 
  96. E Now we can find out about one of the columns. Let's get the mean etc. of 
  97. E column 15, the score on the GHQ (a measure of psychological distress). 
  98. E We use the BASICS command like this: 
  99. E BASICS C15
  100. PAUSE
  101.  
  102.  
  103.  
  104. BASICS C15
  105. E Just like the LIST command we can use BASICS with IF to look at only 
  106. E some of our sample. How about the first 50 rows: 
  107. E BASICS GHQ IF ROW<=50
  108. PAUSE
  109.  
  110.  
  111.  
  112. BASICS GHQ IF ROW<=50
  113. E Or how about all the men (column 3 codes for sex):
  114. E BASICS GHQ IF C3=1
  115. PAUSE
  116.  
  117.  
  118.  
  119. BASICS GHQ IF C3=1
  120. E Not all the commands can use IF, so we need another way to be able to 
  121. E look at only some of the data. To do this we use the NARROW command. 
  122. E Another way to look at only the men is as follows:
  123. E NARROW SEX=1
  124. E BASICS GHQ
  125. PAUSE
  126.  
  127.  
  128.  
  129. NARROW SEX=1
  130. BASICS GHQ
  131. E In this case though, the data set will remain narrowed down permanently 
  132. E until we issue the WIDEN command. We'll do that now:
  133. E WIDEN
  134. PAUSE
  135.  
  136.  
  137.  
  138. WIDEN
  139. E Now we'll do our first statistical test. Maybe we could see if the men 
  140. E have higher GHQ scores than the women. Let's see if there are more men 
  141. E scoring 12 or above than women using a chi-squared test on a contingency 
  142. E table. We'll want 2 rows and 2 columns, and we'll need to define 
  143. E conditions to be included in each row and each column. The whole thing 
  144. E will look like this:
  145. E CHISQ
  146. E 2
  147. E 2
  148. E GHQ<12
  149. E GHQ>=12
  150. E SEX=1
  151. E SEX=2
  152. PAUSE
  153.  
  154.  
  155.  
  156. E Here we go then...
  157. CHISQ
  158. 2
  159. 2
  160. GHQ<12
  161. GHQ>=12
  162. SEX=1
  163. SEX=2
  164. E Or we could use Wilcoxon's rank sum test to see if the scores are 
  165. E generally higher for men or for women. That would look like this:
  166. E WILC C15
  167. E SEX=1
  168. E SEX=2
  169. PAUSE
  170.  
  171.  
  172.  
  173. WILC C15
  174. SEX=1
  175. SEX=2
  176. E If we think the data is reasonably distributed, we might prefer to use a 
  177. E T test to make the same comparison, like this:
  178. E TTEST C15
  179. E C3=1
  180. E C3=2
  181. PAUSE
  182.  
  183.  
  184.  
  185. TTEST C15
  186. C3=1
  187. C3=2
  188. E We can do a paired T test on two different columns to see if one is in 
  189. E general higher than the other by entering:
  190. E TTEST P C16 C17  (where the P stands for paired)
  191. PAUSE
  192.  
  193.  
  194.  
  195. TTEST P C16 C17
  196. E We can see how well correlated two columns are by using Kendall's rank 
  197. E correlation coefficient:
  198. E KENDALL HDA HDD
  199. PAUSE
  200.  
  201.  
  202.  
  203. KENDALL HDA HDD
  204. E The equivalent test to be used with normally distributed variables will 
  205. E also give us the least squares linear regression of one variable on the 
  206. E other:
  207. E REGRESS C15 C16
  208. PAUSE
  209.  
  210.  
  211.  
  212. REGRESS C15 C16
  213. E Or we can do multiple linear regression to determine how well one 
  214. E variable is predicted by a number of others:
  215. E MULT C24
  216. E 4
  217. E C19
  218. E C20
  219. E C21
  220. E C22
  221. PAUSE
  222.  
  223.  
  224.  
  225. MULT C24
  226. 4
  227. C19
  228. C20
  229. C21
  230. C22
  231. PAUSE
  232.  
  233.  
  234.  
  235. E If we can't measure a dependent variable directly, maybe we can deduce 
  236. E it's existence by doing principal component analysis:
  237. E COMP
  238. E 4
  239. E C19
  240. E C20
  241. E C21
  242. E C22
  243. E 0.05
  244. PAUSE
  245.  
  246.  
  247.  
  248. COMP
  249. 4
  250. C19
  251. C20
  252. C21
  253. C22
  254. 0.05
  255. PAUSE
  256.  
  257.  
  258.  
  259. E What we've also done is to make new columns which are the scores on all 
  260. E the principal components which contribute more than 0.05 to the overall 
  261. E variance. We've already been shown how well they correlate with each of 
  262. E the variables from which they were formed, but now it is also possible 
  263. E to study them in other ways. The first one went into C25. Maybe we could 
  264. E see how well it correlates with C24:
  265. E REGRESS C24 C25
  266. PAUSE
  267.  
  268.  
  269.  
  270. REGRESS C24 C25
  271. E We can make new columns anyhow we want. We'll make a new column 16 which 
  272. E will be 8 digits wide with 3 decimal places, and call it Frank:
  273. E NEW C16
  274. E FORMAT C16 8 3
  275. E LABEL C16 Frank
  276. E TITLE
  277. PAUSE
  278.  
  279.  
  280.  
  281. NEW C16
  282. FORMAT C16 8 3
  283. LABEL C16 Frank
  284. TITLE
  285. E There it is.
  286. PAUSE
  287.  
  288.  
  289.  
  290. E At the moment there's nothing in it:
  291. E BASICS Frank
  292. BASICS Frank
  293.  
  294.  
  295.  
  296. E Let's make it the difference between C15 and C17:
  297. E DERIVE C16
  298. E C15-C17
  299. E BASICS C16
  300. PAUSE
  301.  
  302.  
  303.  
  304. DERIVE C16
  305. C15-C17
  306. BASICS C16
  307. E Or about the natural log of C15? That would give us an error if 
  308. E C15 is ever zero, so we'll make any values less than or equal to zero 
  309. E to be 0.0001 instead first:
  310. E DERIVE C16
  311. E LN(C15*(C15>0)+0.0001*(C15<=0))
  312. PAUSE
  313.  
  314.  
  315.  
  316. DERIVE C16
  317. LN(C15*(C15>0)+0.0001*(C15<=0))
  318. E Looks complicated, but it shows the kind of thing that can be done. Of 
  319. E course we could have done it more simply using the narrow and widen 
  320. E commands:
  321. E NARROW C15<=0
  322. E DERIVE C16 
  323. E LN(0.0001)
  324. E WIDEN
  325. E NARROW C15>0
  326. E DERIVE C16
  327. E LN(C15)
  328. E WIDEN
  329. PAUSE
  330.  
  331.  
  332.  
  333. NARROW C15<=0
  334. DERIVE C16 
  335. LN(0.0001)
  336. WIDEN
  337. NARROW C15>0
  338. DERIVE C16
  339. LN(C15)
  340. WIDEN
  341. E There are two special functions to make life simple. The first derives a 
  342. E column from another by subtracting the mean and dividing by the 
  343. E standard deviation:
  344. E DERIVE C16 ZED C15
  345. E BASICS C16
  346. PAUSE
  347.  
  348.  
  349.  
  350. DERIVE C16 ZED C15
  351. BASICS C16
  352. E And the other takes the rank of the value in its column:
  353. E DERIVE C16 RANK C15
  354. E BASICS C16
  355. PAUSE
  356.  
  357.  
  358.  
  359. DERIVE C16 RANK C15
  360. BASICS C16
  361. E We can just do sums:
  362. E ARITH 
  363. E 5 +5*38
  364. E 2.6/7+(3.5-.6)pow(0.5)
  365. PAUSE
  366.  
  367.  
  368.  
  369. ARITH 
  370. 5 +5*38
  371. 2.6/7+(3.5-.6)pow(0.5)
  372.  
  373. ; The above blank line takes us out of the ARITHMETIC command
  374.  
  375. E Or we can use the probability look-up functions, e.g. to find the 
  376. E significance of a Chi-squared of 13.6 with 2 degrees of freedom:
  377. E ARITH 
  378. E 13.6PX2
  379. PAUSE
  380.  
  381.  
  382.  
  383. ARITH 
  384. 13.6PX2
  385.  
  386. PAUSE
  387.  
  388.  
  389.  
  390. E Now let's have a look at the special data editor supplied which is 
  391. E called up with the EDIT command. You can use the cursor keys to move 
  392. E around the data and alter it by typing in new values. New columns are 
  393. E added at the end by pushing Ctrl-RIGHT, and new rows are added with the 
  394. E ENTER key. When you have finished playing with the editor push the ESC 
  395. E key.
  396. E EDIT
  397. PAUSE
  398.  
  399.  
  400.  
  401. EDIT
  402. E
  403. E
  404. E Well, that gives you a rough idea of some of what's available. You can 
  405. E write output to files or printer, and you can input commands from the 
  406. E keyboard or from files like this one. There's a one-way analysis of 
  407. E variance test that we haven't mentioned, and a few other odds and ends 
  408. E around the place.
  409. E If you're going to use EASISTAT you are STRONGLY advised to print off 
  410. E this file (called DEMO) and study it carefully. If you don't have a
  411. E manual then you should unpack the archive EASIDOC.EXE 
  412. E and study the documentation files it contains. How to do this is
  413. E described in the file titled READ.ME. This is a fairly powerful
  414. E package and you will probabably save yourself a lot of time and
  415. E effort if you do this rather than diving straight in.
  416. E Naturally we hope that you will decide to pay for the program and 
  417. E obtain a proper manual if you have not already done so.
  418. PAUSE
  419. E
  420. E
  421. E This demonstration of EASISTAT's features is now finished, and you
  422. E will be left in control of the program. You may wish to run a second 
  423. E demonstration which shows how EASISTAT can work with EASIGRAF, a 
  424. E graph-drawing program. If you wish to do this and have received the 
  425. E EASIGRAF programs on a separate disk then you should insert this disk
  426. E in the drive now and then enter:
  427. E INPUT GDEMO
  428. E Otherwise you can enter any other EASISTAT commands you like. When 
  429. E you wish to leave the program enter QUIT followed by YES.
  430. E Good luck!     - ARC Scientific 1992
  431.  
  432.